#pragma once

namespace mpk_internal_system {

	using namespace System;
	using namespace System::ComponentModel;
	using namespace System::Collections;
	using namespace System::Windows::Forms;
	using namespace System::Data;
	using namespace System::Drawing;
	using namespace MySql::Data::MySqlClient;

	/// <summary>
	/// Summary for EditDataBasa
	/// </summary>
	public ref class EditDataBasa : public System::Windows::Forms::Form
	{
	public:
		bool succeed_edit;

		EditDataBasa(void)
		{
			InitializeComponent();
			
			succeed_edit = false;
		}

	protected:
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		~EditDataBasa()
		{
			if (components)
			{
				delete components;
			}
		}
	private: System::Windows::Forms::Button^  menu;
	private: System::Windows::Forms::GroupBox^  groupBox1;
	private: System::Windows::Forms::Button^  addBusStop;
	private: System::Windows::Forms::TextBox^  textBox2;
	private: System::Windows::Forms::TextBox^  textBox1;
	private: System::Windows::Forms::Label^  label2;
	private: System::Windows::Forms::Label^  label1;
	private: System::Windows::Forms::GroupBox^  distribution;
	private: System::Windows::Forms::Button^  addDistribution;
	private: System::Windows::Forms::Label^  label4;
	private: System::Windows::Forms::TextBox^  textBox3;
	private: System::Windows::Forms::Label^  label3;
	private: System::Windows::Forms::ComboBox^  id_distribution;
	private: System::Windows::Forms::GroupBox^  groupBox2;
	private: System::Windows::Forms::Button^  addLine;
	private: System::Windows::Forms::Label^  label5;
	private: System::Windows::Forms::TextBox^  textBox4;
	private: System::Windows::Forms::GroupBox^  groupBox3;
	private: System::Windows::Forms::Button^  addEmployee;
	private: System::Windows::Forms::Label^  label8;
	private: System::Windows::Forms::Label^  label7;
	private: System::Windows::Forms::Label^  label6;
	private: System::Windows::Forms::TextBox^  textBox7;
	private: System::Windows::Forms::TextBox^  textBox6;
	private: System::Windows::Forms::TextBox^  textBox5;
	private: System::Windows::Forms::GroupBox^  groupBox4;
	private: System::Windows::Forms::Button^  button1;
	private: System::Windows::Forms::Label^  label10;
	private: System::Windows::Forms::Label^  label9;
	private: System::Windows::Forms::ComboBox^  comboEmployee;
	private: System::Windows::Forms::ComboBox^  comboLine;
	private: System::Windows::Forms::Button^  refresh;
	private: System::Windows::Forms::GroupBox^  groupBox5;
	private: System::Windows::Forms::Label^  label16;
	private: System::Windows::Forms::Label^  label15;
	private: System::Windows::Forms::Label^  label14;
	private: System::Windows::Forms::Label^  label13;
	private: System::Windows::Forms::Label^  label12;
	private: System::Windows::Forms::Label^  label11;
	private: System::Windows::Forms::ComboBox^  comboBox5;
	private: System::Windows::Forms::TextBox^  textBox8;
	private: System::Windows::Forms::ComboBox^  comboBox4;
	private: System::Windows::Forms::ComboBox^  comboBox3;
	private: System::Windows::Forms::ComboBox^  comboBox2;
	private: System::Windows::Forms::ComboBox^  comboBox1;
	private: System::Windows::Forms::Button^  addConnection;
	private: System::Windows::Forms::DataGrid^  dataGrid1;
	private: System::Windows::Forms::Button^  display;

	protected: 

	protected: 

	private:
		/// <summary>
		/// Required designer variable.
		/// </summary>
		System::ComponentModel::Container ^components;

#pragma region Windows Form Designer generated code
		/// <summary>
		/// Required method for Designer support - do not modify
		/// the contents of this method with the code editor.
		/// </summary>
		void InitializeComponent(void)
		{
			this->menu = (gcnew System::Windows::Forms::Button());
			this->groupBox1 = (gcnew System::Windows::Forms::GroupBox());
			this->addBusStop = (gcnew System::Windows::Forms::Button());
			this->textBox2 = (gcnew System::Windows::Forms::TextBox());
			this->textBox1 = (gcnew System::Windows::Forms::TextBox());
			this->label2 = (gcnew System::Windows::Forms::Label());
			this->label1 = (gcnew System::Windows::Forms::Label());
			this->distribution = (gcnew System::Windows::Forms::GroupBox());
			this->addDistribution = (gcnew System::Windows::Forms::Button());
			this->label4 = (gcnew System::Windows::Forms::Label());
			this->textBox3 = (gcnew System::Windows::Forms::TextBox());
			this->label3 = (gcnew System::Windows::Forms::Label());
			this->id_distribution = (gcnew System::Windows::Forms::ComboBox());
			this->groupBox2 = (gcnew System::Windows::Forms::GroupBox());
			this->addLine = (gcnew System::Windows::Forms::Button());
			this->label5 = (gcnew System::Windows::Forms::Label());
			this->textBox4 = (gcnew System::Windows::Forms::TextBox());
			this->groupBox3 = (gcnew System::Windows::Forms::GroupBox());
			this->addEmployee = (gcnew System::Windows::Forms::Button());
			this->label8 = (gcnew System::Windows::Forms::Label());
			this->label7 = (gcnew System::Windows::Forms::Label());
			this->label6 = (gcnew System::Windows::Forms::Label());
			this->textBox7 = (gcnew System::Windows::Forms::TextBox());
			this->textBox6 = (gcnew System::Windows::Forms::TextBox());
			this->textBox5 = (gcnew System::Windows::Forms::TextBox());
			this->groupBox4 = (gcnew System::Windows::Forms::GroupBox());
			this->button1 = (gcnew System::Windows::Forms::Button());
			this->label10 = (gcnew System::Windows::Forms::Label());
			this->label9 = (gcnew System::Windows::Forms::Label());
			this->comboEmployee = (gcnew System::Windows::Forms::ComboBox());
			this->comboLine = (gcnew System::Windows::Forms::ComboBox());
			this->refresh = (gcnew System::Windows::Forms::Button());
			this->groupBox5 = (gcnew System::Windows::Forms::GroupBox());
			this->addConnection = (gcnew System::Windows::Forms::Button());
			this->label16 = (gcnew System::Windows::Forms::Label());
			this->label15 = (gcnew System::Windows::Forms::Label());
			this->label14 = (gcnew System::Windows::Forms::Label());
			this->label13 = (gcnew System::Windows::Forms::Label());
			this->label12 = (gcnew System::Windows::Forms::Label());
			this->label11 = (gcnew System::Windows::Forms::Label());
			this->comboBox5 = (gcnew System::Windows::Forms::ComboBox());
			this->textBox8 = (gcnew System::Windows::Forms::TextBox());
			this->comboBox4 = (gcnew System::Windows::Forms::ComboBox());
			this->comboBox3 = (gcnew System::Windows::Forms::ComboBox());
			this->comboBox2 = (gcnew System::Windows::Forms::ComboBox());
			this->comboBox1 = (gcnew System::Windows::Forms::ComboBox());
			this->dataGrid1 = (gcnew System::Windows::Forms::DataGrid());
			this->display = (gcnew System::Windows::Forms::Button());
			this->groupBox1->SuspendLayout();
			this->distribution->SuspendLayout();
			this->groupBox2->SuspendLayout();
			this->groupBox3->SuspendLayout();
			this->groupBox4->SuspendLayout();
			this->groupBox5->SuspendLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->dataGrid1))->BeginInit();
			this->SuspendLayout();
			// 
			// menu
			// 
			this->menu->Location = System::Drawing::Point(993, 375);
			this->menu->Name = L"menu";
			this->menu->Size = System::Drawing::Size(75, 23);
			this->menu->TabIndex = 0;
			this->menu->Text = L"Menu";
			this->menu->UseVisualStyleBackColor = true;
			this->menu->Click += gcnew System::EventHandler(this, &EditDataBasa::menu_Click);
			// 
			// groupBox1
			// 
			this->groupBox1->Controls->Add(this->addBusStop);
			this->groupBox1->Controls->Add(this->textBox2);
			this->groupBox1->Controls->Add(this->textBox1);
			this->groupBox1->Controls->Add(this->label2);
			this->groupBox1->Controls->Add(this->label1);
			this->groupBox1->Location = System::Drawing::Point(12, 12);
			this->groupBox1->Name = L"groupBox1";
			this->groupBox1->Size = System::Drawing::Size(230, 91);
			this->groupBox1->TabIndex = 1;
			this->groupBox1->TabStop = false;
			this->groupBox1->Text = L"Edit bus stop";
			// 
			// addBusStop
			// 
			this->addBusStop->Location = System::Drawing::Point(9, 63);
			this->addBusStop->Name = L"addBusStop";
			this->addBusStop->Size = System::Drawing::Size(75, 23);
			this->addBusStop->TabIndex = 4;
			this->addBusStop->Text = L"Add";
			this->addBusStop->UseVisualStyleBackColor = true;
			this->addBusStop->Click += gcnew System::EventHandler(this, &EditDataBasa::addBusStop_Click);
			// 
			// textBox2
			// 
			this->textBox2->Location = System::Drawing::Point(118, 32);
			this->textBox2->Name = L"textBox2";
			this->textBox2->Size = System::Drawing::Size(100, 20);
			this->textBox2->TabIndex = 3;
			// 
			// textBox1
			// 
			this->textBox1->Location = System::Drawing::Point(9, 32);
			this->textBox1->Name = L"textBox1";
			this->textBox1->Size = System::Drawing::Size(100, 20);
			this->textBox1->TabIndex = 2;
			// 
			// label2
			// 
			this->label2->AutoSize = true;
			this->label2->Location = System::Drawing::Point(115, 16);
			this->label2->Name = L"label2";
			this->label2->Size = System::Drawing::Size(49, 13);
			this->label2->TabIndex = 1;
			this->label2->Text = L"Direction";
			// 
			// label1
			// 
			this->label1->AutoSize = true;
			this->label1->Location = System::Drawing::Point(6, 16);
			this->label1->Name = L"label1";
			this->label1->Size = System::Drawing::Size(35, 13);
			this->label1->TabIndex = 0;
			this->label1->Text = L"Name";
			// 
			// distribution
			// 
			this->distribution->Controls->Add(this->addDistribution);
			this->distribution->Controls->Add(this->label4);
			this->distribution->Controls->Add(this->textBox3);
			this->distribution->Controls->Add(this->label3);
			this->distribution->Controls->Add(this->id_distribution);
			this->distribution->Location = System::Drawing::Point(248, 12);
			this->distribution->Name = L"distribution";
			this->distribution->Size = System::Drawing::Size(230, 91);
			this->distribution->TabIndex = 2;
			this->distribution->TabStop = false;
			this->distribution->Text = L"Distribution";
			// 
			// addDistribution
			// 
			this->addDistribution->Location = System::Drawing::Point(6, 63);
			this->addDistribution->Name = L"addDistribution";
			this->addDistribution->Size = System::Drawing::Size(75, 23);
			this->addDistribution->TabIndex = 4;
			this->addDistribution->Text = L"Add";
			this->addDistribution->UseVisualStyleBackColor = true;
			this->addDistribution->Click += gcnew System::EventHandler(this, &EditDataBasa::addDistribution_Click);
			// 
			// label4
			// 
			this->label4->AutoSize = true;
			this->label4->Location = System::Drawing::Point(83, 16);
			this->label4->Name = L"label4";
			this->label4->Size = System::Drawing::Size(30, 13);
			this->label4->TabIndex = 3;
			this->label4->Text = L"Time";
			// 
			// textBox3
			// 
			this->textBox3->Location = System::Drawing::Point(83, 35);
			this->textBox3->Name = L"textBox3";
			this->textBox3->Size = System::Drawing::Size(100, 20);
			this->textBox3->TabIndex = 2;
			// 
			// label3
			// 
			this->label3->AutoSize = true;
			this->label3->Location = System::Drawing::Point(6, 16);
			this->label3->Name = L"label3";
			this->label3->Size = System::Drawing::Size(71, 13);
			this->label3->TabIndex = 1;
			this->label3->Text = L"id_distribution";
			// 
			// id_distribution
			// 
			this->id_distribution->FormattingEnabled = true;
			this->id_distribution->Location = System::Drawing::Point(6, 35);
			this->id_distribution->Name = L"id_distribution";
			this->id_distribution->Size = System::Drawing::Size(71, 21);
			this->id_distribution->TabIndex = 0;
			// 
			// groupBox2
			// 
			this->groupBox2->Controls->Add(this->addLine);
			this->groupBox2->Controls->Add(this->label5);
			this->groupBox2->Controls->Add(this->textBox4);
			this->groupBox2->Location = System::Drawing::Point(484, 12);
			this->groupBox2->Name = L"groupBox2";
			this->groupBox2->Size = System::Drawing::Size(119, 91);
			this->groupBox2->TabIndex = 3;
			this->groupBox2->TabStop = false;
			this->groupBox2->Text = L"Edit Line";
			// 
			// addLine
			// 
			this->addLine->Location = System::Drawing::Point(6, 63);
			this->addLine->Name = L"addLine";
			this->addLine->Size = System::Drawing::Size(75, 23);
			this->addLine->TabIndex = 6;
			this->addLine->Text = L"Add";
			this->addLine->UseVisualStyleBackColor = true;
			this->addLine->Click += gcnew System::EventHandler(this, &EditDataBasa::addLine_Click);
			// 
			// label5
			// 
			this->label5->AutoSize = true;
			this->label5->Location = System::Drawing::Point(6, 15);
			this->label5->Name = L"label5";
			this->label5->Size = System::Drawing::Size(35, 13);
			this->label5->TabIndex = 5;
			this->label5->Text = L"Name";
			// 
			// textBox4
			// 
			this->textBox4->Location = System::Drawing::Point(6, 31);
			this->textBox4->Name = L"textBox4";
			this->textBox4->Size = System::Drawing::Size(100, 20);
			this->textBox4->TabIndex = 0;
			// 
			// groupBox3
			// 
			this->groupBox3->Controls->Add(this->addEmployee);
			this->groupBox3->Controls->Add(this->label8);
			this->groupBox3->Controls->Add(this->label7);
			this->groupBox3->Controls->Add(this->label6);
			this->groupBox3->Controls->Add(this->textBox7);
			this->groupBox3->Controls->Add(this->textBox6);
			this->groupBox3->Controls->Add(this->textBox5);
			this->groupBox3->Location = System::Drawing::Point(609, 12);
			this->groupBox3->Name = L"groupBox3";
			this->groupBox3->Size = System::Drawing::Size(218, 91);
			this->groupBox3->TabIndex = 4;
			this->groupBox3->TabStop = false;
			this->groupBox3->Text = L"Edit Employee";
			// 
			// addEmployee
			// 
			this->addEmployee->Location = System::Drawing::Point(118, 63);
			this->addEmployee->Name = L"addEmployee";
			this->addEmployee->Size = System::Drawing::Size(75, 23);
			this->addEmployee->TabIndex = 9;
			this->addEmployee->Text = L"Add";
			this->addEmployee->UseVisualStyleBackColor = true;
			// 
			// label8
			// 
			this->label8->AutoSize = true;
			this->label8->Location = System::Drawing::Point(6, 49);
			this->label8->Name = L"label8";
			this->label8->Size = System::Drawing::Size(53, 13);
			this->label8->TabIndex = 6;
			this->label8->Text = L"Password";
			// 
			// label7
			// 
			this->label7->AutoSize = true;
			this->label7->Location = System::Drawing::Point(115, 14);
			this->label7->Name = L"label7";
			this->label7->Size = System::Drawing::Size(49, 13);
			this->label7->TabIndex = 8;
			this->label7->Text = L"Surname";
			// 
			// label6
			// 
			this->label6->AutoSize = true;
			this->label6->Location = System::Drawing::Point(6, 14);
			this->label6->Name = L"label6";
			this->label6->Size = System::Drawing::Size(35, 13);
			this->label6->TabIndex = 7;
			this->label6->Text = L"Name";
			// 
			// textBox7
			// 
			this->textBox7->Location = System::Drawing::Point(6, 65);
			this->textBox7->Name = L"textBox7";
			this->textBox7->Size = System::Drawing::Size(100, 20);
			this->textBox7->TabIndex = 2;
			// 
			// textBox6
			// 
			this->textBox6->Location = System::Drawing::Point(112, 30);
			this->textBox6->Name = L"textBox6";
			this->textBox6->Size = System::Drawing::Size(100, 20);
			this->textBox6->TabIndex = 1;
			// 
			// textBox5
			// 
			this->textBox5->Location = System::Drawing::Point(6, 30);
			this->textBox5->Name = L"textBox5";
			this->textBox5->Size = System::Drawing::Size(100, 20);
			this->textBox5->TabIndex = 0;
			// 
			// groupBox4
			// 
			this->groupBox4->Controls->Add(this->button1);
			this->groupBox4->Controls->Add(this->label10);
			this->groupBox4->Controls->Add(this->label9);
			this->groupBox4->Controls->Add(this->comboEmployee);
			this->groupBox4->Controls->Add(this->comboLine);
			this->groupBox4->Location = System::Drawing::Point(833, 12);
			this->groupBox4->Name = L"groupBox4";
			this->groupBox4->Size = System::Drawing::Size(200, 91);
			this->groupBox4->TabIndex = 5;
			this->groupBox4->TabStop = false;
			this->groupBox4->Text = L"Edit Course";
			// 
			// button1
			// 
			this->button1->Location = System::Drawing::Point(9, 63);
			this->button1->Name = L"button1";
			this->button1->Size = System::Drawing::Size(75, 23);
			this->button1->TabIndex = 7;
			this->button1->Text = L"Add";
			this->button1->UseVisualStyleBackColor = true;
			this->button1->Click += gcnew System::EventHandler(this, &EditDataBasa::button1_Click);
			// 
			// label10
			// 
			this->label10->AutoSize = true;
			this->label10->Location = System::Drawing::Point(94, 14);
			this->label10->Name = L"label10";
			this->label10->Size = System::Drawing::Size(66, 13);
			this->label10->TabIndex = 6;
			this->label10->Text = L"id_employee";
			// 
			// label9
			// 
			this->label9->AutoSize = true;
			this->label9->Location = System::Drawing::Point(6, 14);
			this->label9->Name = L"label9";
			this->label9->Size = System::Drawing::Size(37, 13);
			this->label9->TabIndex = 5;
			this->label9->Text = L"id_line";
			// 
			// comboEmployee
			// 
			this->comboEmployee->FormattingEnabled = true;
			this->comboEmployee->Location = System::Drawing::Point(97, 31);
			this->comboEmployee->Name = L"comboEmployee";
			this->comboEmployee->Size = System::Drawing::Size(86, 21);
			this->comboEmployee->TabIndex = 1;
			// 
			// comboLine
			// 
			this->comboLine->FormattingEnabled = true;
			this->comboLine->Location = System::Drawing::Point(6, 31);
			this->comboLine->Name = L"comboLine";
			this->comboLine->Size = System::Drawing::Size(85, 21);
			this->comboLine->TabIndex = 0;
			// 
			// refresh
			// 
			this->refresh->Location = System::Drawing::Point(912, 375);
			this->refresh->Name = L"refresh";
			this->refresh->Size = System::Drawing::Size(75, 23);
			this->refresh->TabIndex = 6;
			this->refresh->Text = L"Refresh";
			this->refresh->UseVisualStyleBackColor = true;
			this->refresh->Click += gcnew System::EventHandler(this, &EditDataBasa::refresh_Click);
			// 
			// groupBox5
			// 
			this->groupBox5->Controls->Add(this->addConnection);
			this->groupBox5->Controls->Add(this->label16);
			this->groupBox5->Controls->Add(this->label15);
			this->groupBox5->Controls->Add(this->label14);
			this->groupBox5->Controls->Add(this->label13);
			this->groupBox5->Controls->Add(this->label12);
			this->groupBox5->Controls->Add(this->label11);
			this->groupBox5->Controls->Add(this->comboBox5);
			this->groupBox5->Controls->Add(this->textBox8);
			this->groupBox5->Controls->Add(this->comboBox4);
			this->groupBox5->Controls->Add(this->comboBox3);
			this->groupBox5->Controls->Add(this->comboBox2);
			this->groupBox5->Controls->Add(this->comboBox1);
			this->groupBox5->Location = System::Drawing::Point(12, 109);
			this->groupBox5->Name = L"groupBox5";
			this->groupBox5->Size = System::Drawing::Size(779, 64);
			this->groupBox5->TabIndex = 7;
			this->groupBox5->TabStop = false;
			this->groupBox5->Text = L"Edit connection";
			// 
			// addConnection
			// 
			this->addConnection->Location = System::Drawing::Point(695, 26);
			this->addConnection->Name = L"addConnection";
			this->addConnection->Size = System::Drawing::Size(75, 23);
			this->addConnection->TabIndex = 12;
			this->addConnection->Text = L"Add";
			this->addConnection->UseVisualStyleBackColor = true;
			this->addConnection->Click += gcnew System::EventHandler(this, &EditDataBasa::addConnection_Click);
			// 
			// label16
			// 
			this->label16->AutoSize = true;
			this->label16->Location = System::Drawing::Point(565, 13);
			this->label16->Name = L"label16";
			this->label16->Size = System::Drawing::Size(60, 13);
			this->label16->TabIndex = 11;
			this->label16->Text = L"id_busStop";
			// 
			// label15
			// 
			this->label15->AutoSize = true;
			this->label15->Location = System::Drawing::Point(514, 13);
			this->label15->Name = L"label15";
			this->label15->Size = System::Drawing::Size(27, 13);
			this->label15->TabIndex = 10;
			this->label15->Text = L"next";
			// 
			// label14
			// 
			this->label14->AutoSize = true;
			this->label14->Location = System::Drawing::Point(387, 13);
			this->label14->Name = L"label14";
			this->label14->Size = System::Drawing::Size(66, 13);
			this->label14->TabIndex = 9;
			this->label14->Text = L"id_employee";
			// 
			// label13
			// 
			this->label13->AutoSize = true;
			this->label13->Location = System::Drawing::Point(263, 16);
			this->label13->Name = L"label13";
			this->label13->Size = System::Drawing::Size(37, 13);
			this->label13->TabIndex = 8;
			this->label13->Text = L"id_line";
			// 
			// label12
			// 
			this->label12->AutoSize = true;
			this->label12->Location = System::Drawing::Point(136, 16);
			this->label12->Name = L"label12";
			this->label12->Size = System::Drawing::Size(53, 13);
			this->label12->TabIndex = 7;
			this->label12->Text = L"id_course";
			// 
			// label11
			// 
			this->label11->AutoSize = true;
			this->label11->Location = System::Drawing::Point(6, 13);
			this->label11->Name = L"label11";
			this->label11->Size = System::Drawing::Size(71, 13);
			this->label11->TabIndex = 6;
			this->label11->Text = L"id_distribution";
			// 
			// comboBox5
			// 
			this->comboBox5->FormattingEnabled = true;
			this->comboBox5->Location = System::Drawing::Point(568, 29);
			this->comboBox5->Name = L"comboBox5";
			this->comboBox5->Size = System::Drawing::Size(121, 21);
			this->comboBox5->TabIndex = 5;
			// 
			// textBox8
			// 
			this->textBox8->Location = System::Drawing::Point(517, 29);
			this->textBox8->Name = L"textBox8";
			this->textBox8->Size = System::Drawing::Size(45, 20);
			this->textBox8->TabIndex = 4;
			// 
			// comboBox4
			// 
			this->comboBox4->FormattingEnabled = true;
			this->comboBox4->Location = System::Drawing::Point(390, 29);
			this->comboBox4->Name = L"comboBox4";
			this->comboBox4->Size = System::Drawing::Size(121, 21);
			this->comboBox4->TabIndex = 3;
			// 
			// comboBox3
			// 
			this->comboBox3->FormattingEnabled = true;
			this->comboBox3->Location = System::Drawing::Point(263, 29);
			this->comboBox3->Name = L"comboBox3";
			this->comboBox3->Size = System::Drawing::Size(121, 21);
			this->comboBox3->TabIndex = 2;
			// 
			// comboBox2
			// 
			this->comboBox2->FormattingEnabled = true;
			this->comboBox2->Location = System::Drawing::Point(136, 29);
			this->comboBox2->Name = L"comboBox2";
			this->comboBox2->Size = System::Drawing::Size(121, 21);
			this->comboBox2->TabIndex = 1;
			// 
			// comboBox1
			// 
			this->comboBox1->FormattingEnabled = true;
			this->comboBox1->Location = System::Drawing::Point(9, 29);
			this->comboBox1->Name = L"comboBox1";
			this->comboBox1->Size = System::Drawing::Size(121, 21);
			this->comboBox1->TabIndex = 0;
			// 
			// dataGrid1
			// 
			this->dataGrid1->DataMember = L"";
			this->dataGrid1->HeaderForeColor = System::Drawing::SystemColors::ControlText;
			this->dataGrid1->Location = System::Drawing::Point(16, 194);
			this->dataGrid1->Name = L"dataGrid1";
			this->dataGrid1->Size = System::Drawing::Size(1052, 175);
			this->dataGrid1->TabIndex = 8;
			// 
			// display
			// 
			this->display->Location = System::Drawing::Point(831, 375);
			this->display->Name = L"display";
			this->display->Size = System::Drawing::Size(75, 23);
			this->display->TabIndex = 9;
			this->display->Text = L"Display";
			this->display->UseVisualStyleBackColor = true;
			this->display->Click += gcnew System::EventHandler(this, &EditDataBasa::display_Click);
			// 
			// EditDataBasa
			// 
			this->AutoScaleDimensions = System::Drawing::SizeF(6, 13);
			this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
			this->ClientSize = System::Drawing::Size(1080, 410);
			this->Controls->Add(this->display);
			this->Controls->Add(this->dataGrid1);
			this->Controls->Add(this->groupBox5);
			this->Controls->Add(this->refresh);
			this->Controls->Add(this->groupBox4);
			this->Controls->Add(this->groupBox3);
			this->Controls->Add(this->groupBox2);
			this->Controls->Add(this->distribution);
			this->Controls->Add(this->groupBox1);
			this->Controls->Add(this->menu);
			this->Name = L"EditDataBasa";
			this->Text = L"EditDataBasa";
			this->Load += gcnew System::EventHandler(this, &EditDataBasa::EditDataBasa_Load);
			this->groupBox1->ResumeLayout(false);
			this->groupBox1->PerformLayout();
			this->distribution->ResumeLayout(false);
			this->distribution->PerformLayout();
			this->groupBox2->ResumeLayout(false);
			this->groupBox2->PerformLayout();
			this->groupBox3->ResumeLayout(false);
			this->groupBox3->PerformLayout();
			this->groupBox4->ResumeLayout(false);
			this->groupBox4->PerformLayout();
			this->groupBox5->ResumeLayout(false);
			this->groupBox5->PerformLayout();
			(cli::safe_cast<System::ComponentModel::ISupportInitialize^  >(this->dataGrid1))->EndInit();
			this->ResumeLayout(false);

		}
#pragma endregion
	private: System::Void menu_Click(System::Object^  sender, System::EventArgs^  e) {
				 succeed_edit = true;
			 }
	private: System::Void addBusStop_Click(System::Object^  sender, System::EventArgs^  e) {
				System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";
				System::String ^ strCommend = "INSERT INTO przystanek (nazwa, kierunek) VALUES ('" + textBox1->Text + "', '" + textBox2->Text + "');";

				MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase = gcnew MySqlCommand(strCommend, conDatabase);

				conDatabase->Open();

				cmdDatabase->ExecuteNonQuery();
				conDatabase->Close();
				MessageBox::Show("Data added!");
			 }
	private: System::Void addDistribution_Click(System::Object^  sender, System::EventArgs^  e) {
				int index = id_distribution->SelectedIndex;
				index++;

				System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";
				System::String ^ strCommend = "INSERT INTO rozklad (id_przystanek, godzina) VALUES (" + index + ", '" + textBox3->Text + "');";

				MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase = gcnew MySqlCommand(strCommend, conDatabase);

				conDatabase->Open();

				cmdDatabase->ExecuteNonQuery();
				conDatabase->Close();
				MessageBox::Show("Data added!");
			 }
	private: System::Void EditDataBasa_Load(System::Object^  sender, System::EventArgs^  e) {
				 ///ComboBox distribution
				 System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";

				MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase = gcnew MySqlCommand("SELECT * FROM przystanek;", conDatabase);

				conDatabase->Open();

				MySqlDataReader ^ myReader;
				myReader = cmdDatabase->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0) + ".) " + myReader->GetString(1) + " --> " + myReader->GetString(2);
					id_distribution->Items->Add(strCombo);
				}

   
				

				//ComboLine
				//MySqlConnection ^ conDatabase2 = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase2 = gcnew MySqlCommand("SELECT * FROM linia;", conDatabase);

				//conDatabase2->Open();
				myReader->Close();
				myReader = cmdDatabase2->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboLine->Items->Add(strCombo);
				}

				//ComboEmployee
				//MySqlConnection ^ conDatabase2 = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase3 = gcnew MySqlCommand("SELECT * FROM pracownik;", conDatabase);

				//conDatabase2->Open();
				myReader->Close();
				myReader = cmdDatabase2->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboEmployee->Items->Add(strCombo);
				}

				//Connection
				MySqlCommand ^ cmdDatabase4 = gcnew MySqlCommand("SELECT * FROM rozklad;", conDatabase);
				myReader->Close();
				myReader = cmdDatabase4->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboBox1->Items->Add(strCombo);
				}

				MySqlCommand    ^ cmdDatabase5 = gcnew MySqlCommand("SELECT * FROM kurs;", conDatabase);
				myReader->Close();
				myReader = cmdDatabase5->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboBox2->Items->Add(strCombo);
				}

				MySqlCommand    ^ cmdDatabase6 = gcnew MySqlCommand("SELECT * FROM linia;", conDatabase);
				myReader->Close();
				myReader = cmdDatabase6->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboBox3->Items->Add(strCombo);
				}

				MySqlCommand    ^ cmdDatabase7 = gcnew MySqlCommand("SELECT * FROM pracownik;", conDatabase);
				myReader->Close();
				myReader = cmdDatabase7->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboBox4->Items->Add(strCombo);
				}

				MySqlCommand    ^ cmdDatabase8 = gcnew MySqlCommand("SELECT * FROM przystanek;", conDatabase);
				myReader->Close();
				myReader = cmdDatabase8->ExecuteReader();

				while (myReader->Read()) {
					System::String ^ strCombo = myReader->GetString(0);
					comboBox5->Items->Add(strCombo);
				}

				myReader->Close();
				conDatabase->Close();
			 }
	private: System::Void addLine_Click(System::Object^  sender, System::EventArgs^  e) {
				 System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";
				System::String ^ strCommend = "INSERT INTO linia (srodek_transportu) VALUES ('" + textBox4->Text + "');";

				MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase = gcnew MySqlCommand(strCommend, conDatabase);

				conDatabase->Open();

				cmdDatabase->ExecuteNonQuery();
				conDatabase->Close();
				MessageBox::Show("Data added!");
			 }
	private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) {
				int index1 = comboLine->SelectedIndex;
				index1++;
				int index2 = comboEmployee->SelectedIndex;
				index2++;

				System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";
				System::String ^ strCommend = "INSERT INTO kurs (id_linii, id_pracownik) VALUES (" + index1 + ", " + index2 + ");";

				MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
				MySqlCommand    ^ cmdDatabase = gcnew MySqlCommand(strCommend, conDatabase);

				conDatabase->Open();

				cmdDatabase->ExecuteNonQuery();
				conDatabase->Close();
				MessageBox::Show("Data added!");

				
			 }
	private: System::Void refresh_Click(System::Object^  sender, System::EventArgs^  e) {
				 id_distribution->Items->Clear();
				 comboLine->Items->Clear();
				 comboEmployee->Items->Clear();
				 comboBox1->Items->Clear();
				 comboBox2->Items->Clear();
				 comboBox3->Items->Clear();
				 comboBox4->Items->Clear();
				 comboBox5->Items->Clear();

				 EditDataBasa_Load(sender, e);
			 }
private: System::Void addConnection_Click(System::Object^  sender, System::EventArgs^  e) {
			int index1 = comboBox1->SelectedIndex;
			index1++;
			int index2 = comboBox2->SelectedIndex;
			index2++;
			int index3 = comboBox3->SelectedIndex;
			index3++;
			int index4 = comboBox4->SelectedIndex;
			index4++;
			int index5 = comboBox5->SelectedIndex;
			index5++;

			System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";
			System::String ^ strCommend = "INSERT INTO polaczenie (id_rozklad, id_kurs, id_linii, id_pracownik, kolej_przystanek, id_przystanek) VALUES (" + index1 + ", " + index2 + ", " + index3 + ", " + index4 + ", '" + textBox8->Text + "', " + index5 + ");";

			MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
			MySqlCommand    ^ cmdDatabase = gcnew MySqlCommand(strCommend, conDatabase);

			conDatabase->Open();

			cmdDatabase->ExecuteNonQuery();
			conDatabase->Close();
			MessageBox::Show("Data added!");
		 }
	private: System::Void display_Click(System::Object^  sender, System::EventArgs^  e) {
				 System::String ^ strCon = "datasource=localhost;username=root;password=;database=mpk_db";

				 MySqlConnection ^ conDatabase = gcnew MySqlConnection(strCon);
				 MySqlDataAdapter ^ myadp = gcnew MySqlDataAdapter("Select polaczenie.id_polaczenie, polaczenie.kolej_przystanek, polaczenie.id_rozklad, rozklad.godzina, polaczenie.id_przystanek, przystanek.nazwa, przystanek.kierunek, polaczenie.id_kurs, polaczenie.id_pracownik, pracownik.imie, pracownik.nazwisko FROM polaczenie, rozklad, przystanek, kurs, pracownik WHERE polaczenie.id_rozklad=rozklad.id_rozklad AND polaczenie.id_przystanek=przystanek.id_przystanek AND polaczenie.id_kurs=kurs.id_kurs AND polaczenie.id_pracownik=pracownik.id_pracownik", conDatabase);

				//create a dataset
				DataSet ^ myds = gcnew DataSet();

				//now fill and bind the DataGrid
				myadp->Fill(myds, "rozklad");
				dataGrid1->DataSource = myds->Tables["rozklad"]->DefaultView;
				dataGrid1->SetDataBinding(myds, "rozklad");
			 }
};
}
